package com.nova.edc.service.system.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.nova.edc.dao.system.ElecEnergyDao;
import com.nova.edc.model.system.ElecEnergy;
import com.nova.edc.service.system.ElecEnergyService;
import com.nova.frame.dao.criterion.Restrictions;

public class ElecEnergyServiceImpl implements ElecEnergyService {

	@Autowired
	private ElecEnergyDao novaElecEnergyDao;

	@Override
	public List<ElecEnergy> findAll() {
		return novaElecEnergyDao.findAll();
	}

	@Override
	public ElecEnergy findByPowerCode(Integer powerCode) {
		return novaElecEnergyDao.query()
				.add(Restrictions.eq("PowerCode", powerCode)).get();
	}

}
